/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package net.ramptors.dominiobd.client.entity;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Version;

/**
 * @author Gilberto Pacheco Gallegos
 */
@Entity
public class Grupo implements Serializable {
  private static final long serialVersionUID = 1L;
  @Id
  @Column(length = 25)
  private String id;
  @Version
  Integer version;
  @Column(length = 50, nullable = false)
  private String descripcion;
  public Grupo() {
  }
  public Grupo(String id, Integer version, String descripcion) {
    this.id = id;
    this.version = version;
    this.descripcion = descripcion;
  }
  public String getId() {
    return id;
  }
  public void setId(String id) {
    this.id = id;
  }
  public Integer getVersion() {
    return version;
  }
  public String getDescripcion() {
    return descripcion;
  }
  public void setDescripcion(String descripcion) {
    this.descripcion = descripcion;
  }
  @Override
  public int hashCode() {
    int hash = 0;
    hash += (id != null ? id.hashCode() : 0);
    return hash;
  }
  @Override
  public boolean equals(Object object) {
    // TODO: Warning - this method won't work in the case the id fields are not set
    if (!(object instanceof Grupo)) {
      return false;
    }
    Grupo other = (Grupo) object;
    if ((this.id == null && other.id != null) || (this.id != null
        && !this.id.equals(other.id))) {
      return false;
    }
    return true;
  }
  @Override
  public String toString() {
    return "Grupo[" + id + "]";
  }
}